package cn.scu.ne04jdemo.entitiy;

import com.alibaba.excel.annotation.ExcelIgnore;
import com.alibaba.excel.annotation.ExcelProperty;
import com.alibaba.excel.annotation.write.style.ColumnWidth;
import com.alibaba.excel.annotation.write.style.ContentRowHeight;
import com.alibaba.excel.annotation.write.style.HeadRowHeight;
import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonIgnore;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.sql.Date;
import java.time.LocalDateTime;

@Data
@NoArgsConstructor
@Builder
@AllArgsConstructor
@ContentRowHeight(20)
@HeadRowHeight(35)
@ColumnWidth(20)
@TableName(value = "t_supervision_right")
public class SupervisionRight implements Serializable {
    @TableId(type = IdType.AUTO)
    @ExcelIgnore
    private Long id;
    @ExcelProperty(value = "权属名", index = 0)
    private String rightType;
    @ExcelIgnore
    private String dataId;
    @TableField(exist = false)
    @ExcelIgnore
    private User agent;
    @ExcelProperty(value = "开始时间", index = 5)
    private String startTime;
    @ExcelProperty(value = "结束时间", index = 6)
    private String endTime;
    @ExcelProperty(value = "地点（location）", index = 8)
    private String location;
    @ExcelProperty(value = "允许平台（platform）", index = 7)
    private String platform;
    @ExcelIgnore
    private String space;
    @ExcelIgnore
    private String dataType;
    @ExcelIgnore
    private String tool;
    @ExcelIgnore
    private String process;
    @ExcelIgnore
    private String reason;
    @ExcelProperty(value = "数据哈希", index = 2)
    private String hashValue;
    @ExcelProperty(value = "上级权属", index = 1)
    private String superiorPower;
    @ExcelProperty(value = "权利人", index = 4)
    private String agentId;
    @ExcelProperty(value = "数据名称", index = 3)
    private String dataName;

    @TableField(fill = FieldFill.INSERT)
    @JsonIgnore
    @ExcelIgnore
    private LocalDateTime createDate;

    @TableField(fill = FieldFill.INSERT_UPDATE)
    @JsonIgnore
    @ExcelIgnore
    private LocalDateTime updateDate;
}
